home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / gfx / x11 / xlincity098.lha / src / Makefile < prev    next >
Makefile  |  2004-10-19  |  6KB  |  204 lines

  1. #  Makefile for LinCity   (c)  I J Peters 1995,1996.
  2.  
  3. #       This is where the binaries for LinCity will be placed.
  4. LC_BINDIR = /usr/local/bin/
  5. #          for solaris you might choose...
  6. #          LC_BINDIR = /opt/lcity/bin
  7.  
  8. #       This is where the library/data files will be placed.
  9. LC_LIBDIR = /usr/local/lib/lincity/
  10. #          for solaris you might choose...
  11. #          LC_LIBDIR = /opt/lcity/lib
  12. export LC_LIBDIR
  13.  
  14. CFLAGS = -O2 -DLIBDIR=\"$(LC_LIBDIR)\"
  15. # -fno-strength-reduce
  16. #PROFF = -pg
  17. #PROFL = -lc
  18. #PROFD = -DCS_PROFILE
  19.  
  20. LC_XFLAGS = $(CFLAGS) -DLC_X11 
  21. LC_XLIBS = -lXExExt -lXext -lX11
  22.  
  23. XOBJS = xmain.o xmouse.o xscreen.o xmps.o xtypeinit.o xengine.o\
  24.  xtransport.o xmarket.o xhelp.o lcx11.o
  25.  
  26. #SOLARIS_XHOME = /usr/openwin
  27.  
  28. #  /usr/X11R6/lib/X11/config/ is where Imake.tmpl lives, change the following
  29. # line if yours is somewhere else.
  30. LC_IMAKE_ARGS = -DUseInstalled -I/usr/X11R6/lib/X11/config
  31.  
  32. dummy:
  33.     @echo
  34.     @echo '            LinCity  ----------------------  LinCity'
  35.     @echo
  36.     @echo '      'Please use one of the following commands:
  37. #    @echo
  38.     @echo make install '    ' installs the binaries and lib/data files
  39.     @echo '     ' If you do not have the binaries, you will have
  40.     @echo '     ' to use one of the following commands first.
  41.     @echo make lincity '    ' compiles the svga version
  42.     @echo make xlincity '   ' compiles the X version for Linux
  43.     @echo make hpux '       ' compiles the X version for HP-UX 9.05
  44.     @echo make solaris '    ' compiles the X version for Solaris
  45.     @echo '    ' picedit is used to draw the icons, it is not part of the game.
  46.     @echo make picedit '    ' compiles and installs SVGA picedit
  47.     @echo make xpicedit '   ' compiles and installs xpicedit
  48.     @echo
  49.     @echo make clean '      ' deletes the \'*.o\' files and binaries
  50.     @echo make uninstall '  ' uninstalls everything
  51.     @echo
  52.     @echo The current install paths are:
  53. #    @echo
  54.     @echo '          ' Binaries  '    ' $(LC_BINDIR)
  55.     @echo '         ' Libs/Data  '    ' $(LC_LIBDIR)
  56.     @echo
  57.     @echo To change them edit the Makefile and change LC_BINDIR and LC_LIBDIR.
  58. #    @echo LC_BINDIR and LC_LIBDIR.
  59.     @echo
  60.  
  61. all : lincity xlincity
  62.     @echo All done.
  63.  
  64. lc : lincity install
  65.     @echo Installed
  66.  
  67. lincity : main.o mouse.o screen.o mps.o typeinit.o engine.o transport.o\
  68.         market.o help.o
  69.     g++ $(PROFL) main.o mouse.o screen.o mps.o typeinit.o engine.o\
  70.                 transport.o market.o help.o -lm -lvgagl -lvga\
  71.                 -o lincity $(PROFF)
  72.     chmod +s lincity
  73.  
  74. # I only call the Makefile generated by imake for linking
  75. # all the objects and libraries. 
  76. xlincity : $(XOBJS)
  77.     imake -s XMakefile $(LC_IMAKE_ARGS)
  78.     make -f XMakefile
  79.  
  80. solaris :
  81.     make -f sunosMakefile
  82.  
  83. hpux : 
  84.     make -f hpuxMakefile
  85.  
  86. install :
  87.     -cp lincity $(LC_BINDIR)
  88.     -chmod +s $(LC_BINDIR)/lincity
  89.     -cp xlincity $(LC_BINDIR)
  90.     -mkdir -p $(LC_LIBDIR)
  91.     cp -R icons/ $(LC_LIBDIR)
  92.     cp -R help/ $(LC_LIBDIR)
  93.     cp -R messages/ $(LC_LIBDIR)
  94.     cp -R opening/ $(LC_LIBDIR)
  95.     cp open.tga.gz $(LC_LIBDIR)/opening
  96.     cp colour.pal $(LC_LIBDIR)
  97.  
  98. uninstall:
  99.     -rm $(LC_BINDIR)/lincity
  100.     -rm $(LC_BINDIR)/xlincity
  101.     -rm $(LC_BINDIR)/picedit
  102.     -rm $(LC_BINDIR)/xpicedit
  103.     -rm -r $(LC_LIBDIR)
  104.  
  105.  
  106. main.o : main.cxx main.h lin-city.h lctypes.h
  107.     gcc $(PROFF) $(PROFD) -c main.cxx -o main.o $(CFLAGS)
  108.  
  109. xmain.o : main.cxx main.h lin-city.h lctypes.h lcx11.h
  110.     gcc $(PROFF) $(PROFD) -c main.cxx -o xmain.o $(LC_XFLAGS)
  111.  
  112. mouse.o : mouse.cxx mouse.h lin-city.h lctypes.h
  113.     gcc $(PROFF) $(PROFD) -c mouse.cxx -o mouse.o $(CFLAGS)
  114.  
  115. xmouse.o : mouse.cxx mouse.h lin-city.h lctypes.h
  116.     gcc $(PROFF) $(PROFD) -c mouse.cxx -o xmouse.o $(LC_XFLAGS)
  117.  
  118. screen.o : screen.cxx screen.h lin-city.h lctypes.h
  119.     gcc $(PROFF) $(PROFD) -c screen.cxx -o screen.o $(CFLAGS)
  120.  
  121. xscreen.o : screen.cxx screen.h lin-city.h lctypes.h lcx11.h
  122.     gcc $(PROFF) $(PROFD) -c screen.cxx -o xscreen.o $(LC_XFLAGS)
  123.  
  124. mps.o : mps.cxx mps.h lin-city.h lctypes.h
  125.     gcc $(PROFF) $(PROFD) -c mps.cxx -o mps.o $(CFLAGS)
  126.  
  127. xmps.o : mps.cxx mps.h lin-city.h lctypes.h
  128.     gcc $(PROFF) $(PROFD) -c mps.cxx -o xmps.o $(LC_XFLAGS)
  129.  
  130. typeinit.o : typeinit.cxx typeinit.h lin-city.h lctypes.h
  131.     gcc $(PROFF) $(PROFD) -c typeinit.cxx -o typeinit.o $(CFLAGS)
  132.  
  133. xtypeinit.o : typeinit.cxx typeinit.h lin-city.h lctypes.h
  134.     gcc $(PROFF) $(PROFD) -c typeinit.cxx -o xtypeinit.o $(LC_XFLAGS)
  135.  
  136. engine.o : engine.cxx engine.h lin-city.h lctypes.h
  137.     gcc $(PROFF) $(PROFD) -c engine.cxx -o engine.o $(CFLAGS)
  138.  
  139. xengine.o : engine.cxx engine.h lin-city.h lctypes.h
  140.     gcc $(PROFF) $(PROFD) -c engine.cxx -o xengine.o $(LC_XFLAGS)
  141.  
  142. transport.o : transport.cxx transport.h lin-city.h lctypes.h
  143.     gcc $(PROFF) $(PROFD) -c transport.cxx -o transport.o $(CFLAGS)
  144.  
  145. xtransport.o : transport.cxx transport.h lin-city.h lctypes.h
  146.     gcc $(PROFF) $(PROFD) -c transport.cxx -o xtransport.o $(LC_XFLAGS)
  147.  
  148. market.o    : market.cxx market.h lin-city.h lctypes.h
  149.     gcc $(PROFF) $(PROFD) -c market.cxx -o market.o $(CFLAGS)
  150.  
  151. xmarket.o    : market.cxx market.h lin-city.h lctypes.h
  152.     gcc $(PROFF) $(PROFD) -c market.cxx -o xmarket.o $(LC_XFLAGS)
  153.  
  154. help.o      : help.cxx help.h lin-city.h lctypes.h
  155.     gcc $(PROFF) $(PROFD) -c help.cxx -o help.o $(CFLAGS)
  156.  
  157. xhelp.o      : help.cxx help.h lin-city.h lctypes.h
  158.     gcc $(PROFF) $(PROFD) -c help.cxx -o xhelp.o $(LC_XFLAGS)
  159.  
  160. lcx11.o    : lcx11.cxx lcx11.h lin-city.h
  161.     gcc -c lcx11.cxx -o lcx11.o $(LC_XFLAGS)
  162.  
  163.  
  164. clean :
  165.     -rm lincity
  166.     -rm xlincity
  167.     -rm picedit
  168.     -rm xpicedit
  169.     -rm *.o
  170.     -rm XMakefile
  171.     -rm XPMakefile
  172.  
  173. distclean:
  174.     -rm help/*~
  175.     -rm help/*.bak
  176.     -rm opening/*~
  177.     -rm messages/*~
  178.     -rm messages/*.bak
  179.     -rm picedit
  180.     -rm *.bak
  181.     -rm *~
  182.     -rm XMakefile
  183.     -rm XPMakefile
  184.  
  185. picedit : picedit.cxx 
  186.     gcc picedit.cxx -o picedit -lvgagl -lvga $(CFLAGS)
  187.     cp picedit $(LC_BINDIR)
  188.     chmod +s $(LC_BINDIR)/picedit
  189.     -mkdir -p $(LC_LIBDIR)/opening
  190.     cp opening/alt-8x8 $(LC_LIBDIR)/opening
  191.     cp colour.pal $(LC_LIBDIR)
  192.  
  193. # I only call the Makefile generated by imake for linking.
  194. xpicedit : picedit.cxx picedit.h
  195.     gcc -c picedit.cxx -o xpicedit.o $(CFLAGS) -DP_X
  196.     imake -f XPImakefile -s XPMakefile $(LC_IMAKE_ARGS)
  197.     make -f XPMakefile
  198.     cp xpicedit /usr/local/bin
  199.     -mkdir -p $(LC_LIBDIR)/opening
  200.     cp opening/alt-8x8 $(LC_LIBDIR)/opening
  201.     cp colour.pal $(LC_LIBDIR)
  202.  
  203. #    --------  End of Makefile for LinCity  -----------
  204.